home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_dos.lha / dos / sphsrc / falloc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-11-26  |  804 b   |  45 lines

  1. /** FALLOC : falloc.h
  2. FALLOC public header file.
  3. **/
  4.  
  5. /* $Id: falloc.h,v 1.3 90/09/05 18:05:35 dfs Exp Locker: dfs $ */
  6.  
  7.  
  8. #ifndef FALLOC_HEADER
  9. #define FALLOC_HEADER
  10.  
  11. /** Constants
  12. **/
  13.  
  14. #define FALLOC__ZERO      1
  15. #define FALLOC__DONT_ZERO 0
  16. #define FALLOC_BLOCK_SIZE (4096-12)
  17.  
  18.  
  19. /** Types
  20. **/
  21.  
  22. typedef struct  FALLOCchunk     FALLOCchunk;
  23.  
  24. struct FALLOCchunk {
  25.    int  free_bytes;
  26.    char *cur_ptr;
  27.    int  cur_block, num_blocks;
  28.    char **blocks;
  29.    char **over_blocks;          /* Blocks larger than blocksize */
  30.    int  num_over_blocks;
  31.    int  magic;
  32. };
  33.  
  34.  
  35. /** Prototypes
  36. **/
  37.  
  38. FALLOCchunk     *FALLOCnew_chunk (void);
  39. char            *FALLOCalloc(FALLOCchunk*, int nbytes, int zero);
  40. void            FALLOCfree (FALLOCchunk*);
  41. void            FALLOCclear_chunk (FALLOCchunk*);
  42.  
  43. #endif FALLOC_HEADER
  44.  
  45.